#coding: UTF-8

require 'socket'




for i in 0..100 do
  fork do # client i
    

    # Création d'une socket TCP
    sock = TCPSocket.new('localhost', 8080)
    sock.puts("/connect #{rand(10000)}")
      
    # le processus père lit la réponse du serveur
    while reponse = sock.gets
      #print reponse
    end # while
    
  end # client i
end


puts "ici"
Process.wait
 
 puts "Yeah!"

